import 'package:json_annotation/json_annotation.dart';
//part 'userInfoBean.g.dart';
@JsonSerializable()
class SubjectsBean {
  List<Subject1> _subject1;
  List<Subject1> _subject4;

  SubjectsBean({List<Subject1> subject1, List<Subject1> subject4}) {
    this._subject1 = subject1;
    this._subject4 = subject4;
  }

  List<Subject1> get subject1 => _subject1;
  set subject1(List<Subject1> subject1) => _subject1 = subject1;
  List<Subject1> get subject4 => _subject4;
  set subject4(List<Subject1> subject4) => _subject4 = subject4;

  SubjectsBean.fromJson(Map<String, dynamic> json) {
    if (json['subject1'] != null) {
      _subject1 = new List<Subject1>();
      json['subject1'].forEach((v) {
        _subject1.add(new Subject1.fromJson(v));
      });
    }
    if (json['subject4'] != null) {
      _subject4 = new List<Subject1>();
      json['subject4'].forEach((v) {
        _subject4.add(new Subject1.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this._subject1 != null) {
      data['subject1'] = this._subject1.map((v) => v.toJson()).toList();
    }
    if (this._subject4 != null) {
      data['subject4'] = this._subject4.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class Subject1 {
  int _subjectId;
  int _subject;
  String _carType;
  String _courseName;
  String _videoName;
  String _videoJianjie;
  int _timeDuration;
  String _videoUrl;
  String _videoCover;

  Subject1(
      {int subjectId,
        int subject,
        String carType,
        String courseName,
        String videoName,
        String videoJianjie,
        int timeDuration,
        String videoUrl,
        String videoCover}) {
    this._subjectId = subjectId;
    this._subject = subject;
    this._carType = carType;
    this._courseName = courseName;
    this._videoName = videoName;
    this._videoJianjie = videoJianjie;
    this._timeDuration = timeDuration;
    this._videoUrl = videoUrl;
    this._videoCover = videoCover;
  }

  int get subjectId => _subjectId;
  set subjectId(int subjectId) => _subjectId = subjectId;
  int get subject => _subject;
  set subject(int subject) => _subject = subject;
  String get carType => _carType;
  set carType(String carType) => _carType = carType;
  String get courseName => _courseName;
  set courseName(String courseName) => _courseName = courseName;
  String get videoName => _videoName;
  set videoName(String videoName) => _videoName = videoName;
  String get videoJianjie => _videoJianjie;
  set videoJianjie(String videoJianjie) => _videoJianjie = videoJianjie;
  int get timeDuration => _timeDuration;
  set timeDuration(int timeDuration) => _timeDuration = timeDuration;
  String get videoUrl => _videoUrl;
  set videoUrl(String videoUrl) => _videoUrl = videoUrl;
  String get videoCover => _videoCover;
  set videoCover(String videoCover) => _videoCover = videoCover;

  Subject1.fromJson(Map<String, dynamic> json) {
    _subjectId = json['subjectId'];
    _subject = json['subject'];
    _carType = json['carType'];
    _courseName = json['courseName'];
    _videoName = json['videoName'];
    _videoJianjie = json['videoJianjie'];
    _timeDuration = json['timeDuration'];
    _videoUrl = json['videoUrl'];
    _videoCover = json['videoCover'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['subjectId'] = this._subjectId;
    data['subject'] = this._subject;
    data['carType'] = this._carType;
    data['courseName'] = this._courseName;
    data['videoName'] = this._videoName;
    data['videoJianjie'] = this._videoJianjie;
    data['timeDuration'] = this._timeDuration;
    data['videoUrl'] = this._videoUrl;
    data['videoCover'] = this._videoCover;
    return data;
  }
}